drop table spmi_ods.spmi_transfer_global_bill ;
CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_transfer_global_bill(
id                                                 bigint                         COMMENT '主键ID',
operation_financial_center_id                      bigint                         COMMENT '操作财务中心ID',
operation_financial_center_code                    String                         COMMENT '操作财务中心CODE',
operation_financial_center_name                    String                         COMMENT '操作财务中心名称',
waybill_no                                         String                         COMMENT '运单号',
bill_generation_time                               timestamp                      COMMENT '账单产生时间',
bill_generation_date                               String                         COMMENT '账单产生日期',
fee_type_id                                        bigint                         COMMENT '账单子类型ID',
fee_type_code                                      String                         COMMENT '账单子类型名称',
create_time                                        timestamp                      COMMENT '创建时间',
update_time                                        timestamp                      COMMENT '修改时间'
)
COMMENT '全局索引表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_transfer_global_bill'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);